
Ext.setup({
	tabletStartupScreen:"./tabletStartupScreen.png",
	phoneStartupScreen:"./phoneStartupScreen.png",
	tabletIcon:"./tabletIcon.png",
	phoneIcon:"./phoneIcon.png",
	glossOnIcon: true,
	statusBarStyle:"black",
	fullscreen:true,
	preloadImages:[],
	scope:this,
	onReady: function() {
		var tapHandler = function(button, event) {
			var txt = "User tapped the '" + button.text + "' button.";
			Ext.getCmp('toolbartxt').update(txt);
		};
		// 버튼그룹 1
		var buttonsGroup1 = [{
			text: 'Back',
			ui: 'back',
			handler: tapHandler
		}, {
			text: 'Default',
			badgeText: '2',
			handler: tapHandler
		}, {
			text: 'Round',
			ui: 'round',
			handler: tapHandler
		}];
		// 버튼그룹 2
		var buttonsGroup2 = [{
			xtype: 'segmentedbutton',
			// 토글 가능 여부.
			allowDepress: true,
			items: [{
				text: 'Option 1',
				handler: tapHandler,
				pressed: true
			}, {
				text: 'Option 2',
				handler: tapHandler
			}, {
				text: 'Option 3',
				badgeText: '1',
				handler: tapHandler
			}]    
		}];
		// 버튼그룹 3
		var buttonsGroup3 = [{
			text: 'Action',
			ui: 'action',
			badgeText: '5',
			handler: tapHandler
		},
		{
			text: 'Forward',
			ui: 'forward',
			handler: tapHandler
		}];
		var dockedItems = [{
			dock : 'top',
			xtype: 'toolbar',
			title: 'Toolbar Sample 1'
		},{
			xtype: 'toolbar',
			ui: 'light',
			items: buttonsGroup1,
			dock: 'top'
		}, {
			xtype: 'toolbar',
			ui: 'dark',
			items: buttonsGroup2,
			dock: 'bottom'
		}, {
			xtype: 'toolbar',
			ui: 'light',
			items: buttonsGroup3,
			dock: 'bottom'
		}];
		new Ext.Panel({
			fullscreen: true,  
			id:"toolbartxt",
			scroll:"vertical",
			layout:"fit",
			dockedItems:dockedItems,
			html:"toolbar test"
		})
	}
});